package com.pig4cloud.pigx.contract.api.v1.controller;

import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.common.customize.api.annotation.OpenApi;
import com.pig4cloud.pigx.user.enums.UserApiKeyEnum;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试控制器v1
 *
 * @since 2022/11/10 17:29
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("{version}/contract/test")
@OpenApi(version = "1")
public class TestControllerV1 {

    @RequestMapping
    @OpenApi(version = "2", rateLimit = 1, rateLimitRange = 10, permission = UserApiKeyEnum.Permission.TRANSFER, needSignature = false)
    public R<Object> get() {
        return R.ok("v1");
    }

}
